package com.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import redis.clients.jedis.Jedis;

import java.util.Set;

@Controller
//@RequestMapping("/PageController")
public class PageController {

    @RequestMapping("/index")
    public String index(Model m){
        m.addAttribute("userName","狗春");
        System.out.println("你妈逼");
        return "index";
    }

    @RequestMapping("/jedis")
    public String jedis(Model m){
        //linux的ip,redis的端口号
        Jedis j =new Jedis("192.168.48.128",6379);
        //选择0号库
        j.select(0);
        j.close();
        return "index";
    }
}
